﻿//-----------------------------------------------------------------------
// <copyright file="ExceptionProvider.cs" company="CodePlex">
//     Copyright (c) Doug Holland, CodePlex. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace CodePlex.Diagnostics
{
    using System;
    
    using System.Security;
    using System.Security.Principal;
    
    /// <summary>
    /// The <see cref="T:CodePlex.Diagnostics.ExceptionProvider"/> class provides backwards compatibility only, extension methods defined within the <see cref="T:CodePlex.Diagnostics.ExceptionExtensions"/> class should be used instead.
    /// </summary>
    [Obsolete("The CodePlex.Diagnostics.ExceptionProvider class provides backwards compatibility only, extension methods defined within the CodePlex.Diagnostics.ExceptionExtensions class should be used instead.", false)]
    public static class ExceptionProvider
    {
        #region public static Guid Publish(Exception ex, IIdentity identity)

        /// <summary>
        /// Publishes the <see cref="T:System.Exception"/> using the configured exception provider.
        /// </summary>
        /// <param name="ex">The <see cref="T:System.Exception"/> to be published.</param>
        /// <param name="identity">The <see cref="T:System.Security.Principal.IIdentity"/> to associate with this published exception.</param>
        /// <returns>A <see cref="T:System.Guid"/> representing the unique publication identifier for an exception and associated inner exceptions.</returns>
        [Obsolete("This method is obsolete, it has been replaced by extension methods defined within the CodePlex.Diagnostics.ExceptionExtensions class.", false)]
        public static Guid Publish(Exception ex, IIdentity identity)
        {
            return ex.Publish(identity);
        }
        
        #endregion
    }
}
